The present invention relates to a numerical control apparatus used in a machine tool.
A plurality of tools are used in a machine tool to machine a workpiece. In this case, when tools are frequently replaced, it takes a long time for tool replacement, thus prolonging machining time and degrading efficiency. In order to decrease the number of times tool replacement occurs, the machining operation as a whole is analyzed to create a program. In this case, all the machining steps must be analyzed to create the program, so that program creation results in time-consuming and cumbersome operations. A recently developed program created by a conversation type automatic program function requires a larger number of tool replacement times as compared with a program created by general NC commands.
For example, as shown in FIG. 1, in a program wherein holes A are formed in hole positions P1 to P8 of a workpiece W, and holes B, having a different diameter from that of the holes A, are formed in hole positions P9 and P10 thereof, respectively, a program created by a conversational format which does not consider the number of tool replacement times is required, as shown in FIG. 2. When this conversationally created program is executed, a tool T1 (center drill) is used to form small holes in the hole positions P1 to P8, and the tool T1 is replaced with a tool T2 (drill). The tool T2 is then used to form the holes A. The tool T2 is replaced with the tool T1 again, and the tool T1 (center drill) is used to form small holes in the hole positions P9 and P10. Thereafter, the tool T1 is replaced with a tool T3 (drill), and the tool T3 is used to form the holes in the hole positions P9 and P10.
According to the above program, the tool T1 is replaced twice, so that the number of tool replacement times becomes three, thus increasing the tool replacement time and hence the total machining time.